package com.ffcs.web.model.entity;
import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * AuthCode entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "wechat_authcode", uniqueConstraints = @UniqueConstraint(columnNames = "telphone"))
public class AuthCode implements java.io.Serializable {

	// Fields

	private Integer id;
	private String telphone;
	private String authCode;
	private Date startTime;
	private Date endTime;

	// Constructors

	/** default constructor */
	public AuthCode() {
	}

	/** full constructor */
	public AuthCode(Integer id, String telphone, String authCode,
			Date startTime, Date endTime) {
		this.id = id;
		this.telphone = telphone;
		this.authCode = authCode;
		this.startTime = startTime;
		this.endTime = endTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "telphone", unique = true, nullable = false, length = 20)
	public String getTelphone() {
		return this.telphone;
	}

	public void setTelphone(String telphone) {
		this.telphone = telphone;
	}

	@Column(name = "authCode", nullable = false, length = 10)
	public String getAuthCode() {
		return this.authCode;
	}

	public void setAuthCode(String authCode) {
		this.authCode = authCode;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "startTime", nullable = false, length = 19)
	public Date getStartTime() {
		return this.startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "endTime", nullable = false, length = 19)
	public Date getEndTime() {
		return this.endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

}